package com.codeczx.completeuidemo.recyclerview.md;

import android.content.Context;
import com.codeczx.completeuidemo.recyclerview.md.RV1Contract.RV1Presenter;
import com.codeczx.completeuidemo.recyclerview.md.RV1Contract.RV1View;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by codeczx on 2017/9/13.
 */

public class RV1PresenterImpl implements RV1Presenter {

    private Context mContext;
    private RV1View mView;

    public RV1PresenterImpl(Context context,RV1View view){
        mContext = context;
        mView = view;
    }

    @Override
    public void initData() {
        List<Object> items = new ArrayList<>();
        for (int i = 0; i < 8; i++) {
            items.add(new Type1Bean("type1:"+i));
            for (int j = 0; j < 4; j++) {
                items.add(new Type2Bean("type2:"+j));
            }
        }
        mView.onDataLoaded(items);
    }

    @Override
    public void refreshUI() {

    }
}
